package com.transitionseverywhere.utils;

import android.graphics.PointF;
import android.transition.ChangeBounds;
import android.util.Property;
import android.view.View;

/* loaded from: classes.dex */
class ViewUtilsLollipopMr1 extends ViewUtilsLollipop {
    private static final PointF TEMP_POINT_F = new PointF();
    private static final Property<View, PointF> POSITION_PROPERTY = getChangeBoundsProperty("POSITION_PROPERTY");
    private static final Property<View, PointF> BOTTOM_RIGHT_PROPERTY = getChangeBoundsProperty("BOTTOM_RIGHT_ONLY_PROPERTY");

    private static Property<View, PointF> getChangeBoundsProperty(String str) {
        Object fieldValue = ReflectionUtils.getFieldValue(null, null, ReflectionUtils.getPrivateField(ChangeBounds.class, str));
        if (fieldValue instanceof Property) {
            Property<View, PointF> property = (Property) fieldValue;
            try {
                property.set(null, new PointF());
                return property;
            } catch (NullPointerException unused) {
                return property;
            } catch (Exception unused2) {
                return null;
            }
        }
        return null;
    }

    @Override // com.transitionseverywhere.utils.ViewUtils.BaseViewUtils
    public void setLeftTopRightBottom(View view, int i, int i2, int i3, int i4) {
        if (POSITION_PROPERTY != null && BOTTOM_RIGHT_PROPERTY != null) {
            TEMP_POINT_F.set(i, i2);
            POSITION_PROPERTY.set(view, TEMP_POINT_F);
            TEMP_POINT_F.set(i3, i4);
            BOTTOM_RIGHT_PROPERTY.set(view, TEMP_POINT_F);
            return;
        }
        super.setLeftTopRightBottom(view, i, i2, i3, i4);
    }
}
